package com.traffic.managent.jedis.running;

import org.apache.log4j.Logger;

import com.traffic.managent.jedis.Redis;
import com.traffic.managent.service.order.bean.OrderBean;

public class OrderAcceptExecutor implements OrderUtils {

	private static Logger logger = Logger.getLogger(OrderAcceptExecutor.class);

	public final static OrderAcceptExecutor service = new OrderAcceptExecutor();

	public void setOrder(OrderBean order) {
		// 注意redis 的rpush 与lpush的区别
		logger.info("set single order id " + order.getIds() + ",phoneNo = " + order.getPhoneNo() + " to redis do.. ");
		Redis.use("redisOrderPlugin").rpush(OrderUtils.ORDER_LIST, order);
		logger.info(
				"set single order id " + order.getIds() + ",phoneNo = " + order.getPhoneNo() + " to redis successful ");
	}

}
